package com.flute.framework.autoprompt;

import com.flute.framework.FluteMonitor;
import com.flute.framework.business.TimerChecksum;
import com.flute.framework.configuration.ChecksumXMLConverter;
import com.flute.framework.exception.ConfigurationParseException;
import com.flute.framework.monitor.EventLogger;
import com.flute.tools.util.ExceptionUtil;

/**
 * @author Jazz
 * 
 */
public class ChecksumService {

	private static TimerChecksum checksum;

	static {
		try {
			EventLogger.startNewEvent(FluteMonitor.getImporterKey());
			checksum = new TimerChecksum(ChecksumXMLConverter.class
					.getClassLoader().getResourceAsStream(
							"config/preparer/checksum/checksum.xml"));
		} catch (ConfigurationParseException e) {
			EventLogger.error("加载ChecksumCount配置文件失败."
					+ ExceptionUtil.getExceptionContent(e),
					EventLogger.MONITOR_KEY);
		}
		checksum.start();
	}

}
